//2009/08/10 22:13:59
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <sstream>

using namespace std;

class OfficeParking
{
public:
    int spacesUsed(vector <string> events)
    {
		int space = 0;
		int mmax = 0;
		for(int i=0; i<events.size(); i++)
		{
			stringstream s(events[i]);
			string s1,s2;
			s >> s1 >> s2;
			if(s2.compare("arrives") == 0)
				space ++;
			else if(s2.compare("departs") == 0)
				space --;
			mmax = max(mmax, space);
		}
		return mmax;
    }
};
